def EceptionDetail(a,b):

    try:
        c = a/b
    except ZeroDivisionError as msg:
        print('程序异常')
        print(msg)
    except Exception as msg:
        print(msg)
    print(c)
EceptionDetail(1,0)

# 自定义异常类